﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using BusinessLayer.RegInfo.Entities;
using DBHelper;

namespace BusinessLayer.RegInfo
{
    public class TB_MarketingBL
    {
        public TB_Marketing GetTopMarketing(int loai)
        {
            var adapter = new BaseDAO(DbConfig.DbRegInfoConnectionString);
            adapter.AddParameter("@Loai", loai);
            var list = adapter.GetList<TB_Marketing>("sp_GetTopMarketing", CommandType.StoredProcedure, CustomConnectionState.CloseOnExit);
            return list.FirstOrDefault();
        }
    }
}
